﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Commons.Collections;
using NVelocity;
using NVelocity.App;

namespace Bosphorus.Migrator.Dialect.ViewEngine.NVelocity
{
    public class NVelocityViewEngine : IViewEngine
    {
        private readonly VelocityEngine velocityEngine;

        public NVelocityViewEngine()
        {
            //velocityEngine = new VelocityEngine();
            //ExtendedProperties properties = new ExtendedProperties();
            //velocityEngine.Init(properties);
        }

        public string Evaluate(ViewEngineContext viewEngineContext)
        {
            return viewEngineContext.TemplatePath;
            //VelocityContext context = new VelocityContext();
            //context.Put("Model", viewEngineContext.Model);
            //StringWriter writer = new StringWriter();
            //Template template = velocityEngine.GetTemplate(viewEngineContext.TemplatePath);
            //template.Merge(context, writer);
            //return writer.GetStringBuilder().ToString();
        }
    }
}
